<nz-alert style="margin-bottom: 8px;" nzType="info" nzMessage="可以直接粘贴Excel数据: 选中要复制的单元格范围,然后在输入框中粘贴即可" nzShowIcon></nz-alert>
<nz-table #basicTable
          nzSize="small" 
          nzNoResult=""
          nzBordered      
          [nzScroll]="{x:'1300px'}"    
          class="sku-multiple-table" 
          cellpadding="0" 
          cellspacing="0">
    <thead>
        <tr>    
            <th nzLeft="0px"></th>        
            <th class="wd92" nzWidth="80px" 
                style="min-width: 80px; max-width: 80px;text-align: center" 
                *ngFor="let attr of attrList">
                {{attr}}  
                <span *ngIf="attr === '型号' || attr === '色号'" class="text-error">*</span>              
                <span *ngIf="attr === 'SKU'" nz-tooltip nzTitle="合并型号及色号" [nzOverlayStyle]="{'font-size.px': 12}">
                    <a (click)="mergeStyleColor()"><i class="anticon anticon-fork"></i></a>
                </span>
            </th>
        </tr>
    </thead>
    <tbody>
        <tr *ngFor="let datarow of dataTable; let row = index"> 
            <td nzLeft="0px" style="text-align: center; width: 50px;">{{row + 1}}</td>           
            <td *ngFor="let col of attrList; let stdi = index" style="text-align: center; width: 50px">
                <div *ngIf="stdi == 0" style="display: inline-block;">                
                    <nz-upload
                        class = "goods-pic"
                        [nzAction]="uploadUrl"
                        nzListType="picture-card"
                        [nzShowUploadList]="false"
                        [nzBeforeUpload]="beforeUpload"
                        (nzChange)="handleChange(row, stdi, $event)"
                    >
                        <i *ngIf="!dataTable[row][stdi]" class="anticon anticon-plus"></i>
                        <img *ngIf="dataTable[row][stdi]" [src]="dataTable[row][stdi]['url']" class="avatar">                    
                    </nz-upload>
                </div>                
                <input *ngIf="stdi != 0 && (stdi < 5 || stdi > 7)" style="width: 80px;" type="text" [(ngModel)]="dataTable[row][stdi]" (paste)="pasteExcel(row, stdi, $event)">
                <nz-input-number *ngIf="stdi>=5 && stdi<=7" style="width: 80px;" (paste)="pasteExcel(row, stdi, $event)" [(ngModel)]="dataTable[row][stdi]" [nzPrecision]="0" [nzSize]="'small'" [nzMin]="0" [nzStep]="1"></nz-input-number>
            </td>            
        </tr>
        <tr>    
            <td nzLeft="0px" style="text-align: center; min-width: 60px">批量修改</td>        
            <td *ngFor="let col of attrList; let stdi = index" style="text-align: center;background: #f7f7f7">                
                <input *ngIf="stdi != 0 && (stdi < 5 || stdi > 7)" style="width: 80px;" type="text" [(ngModel)]="batch[stdi]" (blur)="batchEdit(stdi)">
                <nz-input-number *ngIf="stdi>=5 && stdi<=7" style="width: 80px;" [(ngModel)]="batch[stdi]" [nzSize]="'small'" [nzMin]="0" [nzStep]="1" [nzPrecision]="0" (ngModelChange)="batchEdit(stdi)"></nz-input-number>
            </td>
        </tr>
    </tbody>
</nz-table>
<button nz-button type="button" (click)="append()" *ngIf="dataTable.length <= 9" [nzType]="'dashed'" class="ant-btn__block mt-sm">
    <i class="anticon anticon-plus"></i>
    <span>添加</span>
</button>